package cn.btks.resultintegration.achievements.repository;

import cn.btks.resultintegration.achievements.pojo.LayerFeatures;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @Author lijun
 * @Date 2021/2/24 15:22
 */
@Repository
public interface LayerFeaturesRepository extends JpaRepository<LayerFeatures,Long> {

    /**
     * 根据文件英文名查询要素管控要求
     * @param name
     * @return
     */
    LayerFeatures findByName(String name);

    /**
     * 删除所有要素
     * @return
     */
    @Modifying
    @Query(value = "delete from layer_features",nativeQuery = true)
    int deleteAllFeatures();
}
